home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2003 September / PC Answers September 2003.iso / Software / freeware / pixeltoolbox / Setup.exe / Main / PixelToolbox.exe / PixelToolbox.dxr / Scripts_81_mouse script - 32bit image functions.ls < prev    next >
Encoding:
Text File  |  2002-06-08  |  2.4 KB  |  102 lines

  1. property pMySprite, pMyMember, pMyMember2, pMyMember3
  2.  
  3. on beginSprite me
  4.   pMySprite = sprite(me.spriteNum)
  5.   pMyMember = pMySprite.memberNum
  6.   pMyMember2 = pMyMember - 1
  7.   pMyMember3 = pMyMember + 1
  8. end
  9.  
  10. on mouseEnter me
  11.   if sprite(1).pUndoTrigger = 0 then
  12.     pass()
  13.   else
  14.     set the memberNum of sprite pMySprite to pMyMember3
  15.     case the currentSpriteNum of
  16.       "187":
  17.         put "Load the current image to adjust the hue, saturation, and lightness." into field "status"
  18.       "188":
  19.         put "Apply HSL adjustment to the current image." into field "status"
  20.       "193":
  21.         put "Load the current image to adjust the brightness and contrast." into field "status"
  22.       "194":
  23.         put "Apply tonality adjustment to the current image." into field "status"
  24.       "198":
  25.         put "Blur the current image." into field "status"
  26.       "199":
  27.         put "Sharpen the current image." into field "status"
  28.       "200":
  29.         put "Convert the current image to its negative." into field "status"
  30.       "201":
  31.         put "Colorize the current image using the foreground color." into field "status"
  32.     end case
  33.   end if
  34. end
  35.  
  36. on mouseLeave me
  37.   if sprite(1).pUndoTrigger = 0 then
  38.     pass()
  39.   else
  40.     set the memberNum of sprite pMySprite to pMyMember
  41.     put EMPTY into field "status"
  42.   end if
  43. end
  44.  
  45. on mouseDown me
  46.   if sprite(1).pUndoTrigger = 0 then
  47.     pass()
  48.   else
  49.     repeat while the mouseDown
  50.       set the memberNum of sprite pMySprite to pMyMember2
  51.       updateStage()
  52.     end repeat
  53.   end if
  54. end
  55.  
  56. on mouseUp me
  57.   if sprite(1).pUndoTrigger = 0 then
  58.     pass()
  59.   else
  60.     set the memberNum of sprite pMySprite to pMyMember3
  61.     if sprite(4).left <> 800 then
  62.       case the currentSpriteNum of
  63.         "187":
  64.           beep()
  65.         "188":
  66.           beep()
  67.         "193":
  68.           beep()
  69.         "194":
  70.           beep()
  71.         "198":
  72.           blurImage32()
  73.         "199":
  74.           sharpenImage32()
  75.         "200":
  76.           invertImage32()
  77.         "201":
  78.           colorizeImage32()
  79.       end case
  80.     else
  81.       case the currentSpriteNum of
  82.         "187":
  83.           loadAdjustHSL()
  84.         "188":
  85.           applyAdjustHSL()
  86.         "193":
  87.           loadAdjustTone()
  88.         "194":
  89.           applyAdjustTone()
  90.         "198":
  91.           blurImage32()
  92.         "199":
  93.           sharpenImage32()
  94.         "200":
  95.           invertImage32()
  96.         "201":
  97.           colorizeImage32()
  98.       end case
  99.     end if
  100.   end if
  101. end
  102.